import request from '@/utils/request'

//修改歌曲
export function updateSong(song) {
    return request({
        url: `/song/update`,
        method: 'put',
        data: song
    })
}

//根据歌曲id查询歌曲
export function getSongById(id) {
    return request({
        url: `/song/getSongById/${id}`,
        method: 'get'
    })
}

//删除歌曲
export function deleteSong(id) {
    return request({
        url: `/song/delete/${id}`,
        method: 'delete'
    })
}

//添加歌曲
export function addSong(song) {
    return request({
        url: `/song/add`,
        method: 'post',
        data: song
    })
}

//根据专辑id查询歌曲
export function selectByAlbumId(userId, id) {
    return request({
        url: `/song/selectByAlbumId/${userId}/${id}`,
        method: 'get'
    })
}